<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateAdvsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('advs', function (Blueprint $table) {
            $table->increments('id');
            $table->string('location',50)->comment('位置');
            $table->string('area',50)->nullable()->comment('区域');
            $table->string('title',50)->nullable()->comment('标题');
            $table->integer('image_id')->comment('图片id');
            $table->string('redirect_type',50)->comment('跳转类型');
            $table->string('redirect_to',200)->comment('跳转路径');
            $table->string('url',200)->comment('URL');
            $table->integer('list_order')->default(50)->comment('排序');
            $table->string('app_name',50)->nullable()->comment('');
            $table->string('app_version',50)->nullable()->comment('');
            $table->tinyInteger('status')->default(1)->comment('状态1显示0隐藏');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('advs');
    }
}
